package com.longxiao.enums;

/**
 * Created by houhongwei on 2017/5/18.
 */
public enum MessageType {

    Schedule("预约"),
    Practice("练习"),
    Vocabulary("词本"),
    Test("测验"),
    Message("站内信"),
    Evaluate("评价")

    ;

    private String descr;


    private MessageType(String descr) {
        this.descr = descr;
    }

    public String getDescr() {
        return descr;
    }
    
    public static MessageType getType(String typeName) {
    	MessageType[] msgTypes = values();
    	for(MessageType msgType : msgTypes) {
    		if(msgType.name().equalsIgnoreCase(typeName)) {
    			return msgType;
    		}
    	}
    	return null;
    }
}
